{{#if (or hasAttachments canEdit)}}
	<Ui::UiSpacer @size="200" />
	<div class="title">attachments</div>
	<div class="document-sidebar-attachment">
		<ul class="files">
			{{#each files key="id" as |file|}}
				{{#if (eq file.pageId "")}}
					<li class="file">
						<a href="{{appMeta.endpoint}}/public/attachment/{{appMeta.orgId}}/{{file.id}}{{downloadQuery}}">
							{{file.filename}}
						</a>
						{{#if canEdit}}
							<div class="menu">
								<i class="dicon {{constants.Icon.Cross}}">
									{{#attach-popover class="ember-attacher-popper" hideOn="escapekey, clickout" showOn="click" isShown=false}}
										<div class="form">
											<p>Are you sure you want to delete this file?</p>
											<Ui::UiSpacer @size="100" />
											{{ui/ui-button
												light=false
												label=constants.Label.Delete
												color=constants.Color.Red
												onClick=(action "onDelete" file)}}
										</div>
									{{/attach-popover}}
								</i>
							</div>
						{{/if}}
					</li>
				{{/if}}
			{{/each}}
			{{#if canEdit}}
				<li id="upload-document-files">
					<i class="dicon {{constants.Icon.Plus}}"></i>
				</li>
			{{/if}}
		</ul>
	</div>
	{{#if canEdit}}
		{{#unless hasAttachments}}
			<Ui::UiSpacer @size="100" />
		{{/unless}}
	{{/if}}
{{/if}}
